
<!DOCTYPE html>

<html lang="zh-CN">
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
        <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
        <link rel="shortcut icon" type="image/png" href="/static/favicon.ico"/>
        <link rel="apple-touch-icon" href="/static/apple-touch-icon.png">

<title>NiuBiEX.com让电子币交易更安全，更迅速、更简单。</title>
<!-- 自己适应 -->
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<!--[if lt IE 9]>
　　
<script src="http://css3-mediaqueries-js.googlecode.com/svn/trunk/css3-mediaqueries.
　　  js"></script>
<![endif]-->
<link rel="icon" href="/favicon.ico">
<link href="/static/bootstrap/css/docs.min.css" rel="stylesheet">
<link rel="stylesheet" href="/static/lib/font-awesome-4.7.0/css/font-awesome.min.css">
<link href="/static/bootstrap/css/bootstrap.min.css" rel="stylesheet">
<link type="text/css" href="/static/css/my.css" rel="stylesheet"/>
<link type="text/css" href="/static/css/common.css" rel="stylesheet"/>
<script src="/static/lib/jquery-3.2.1.min.js"></script>
<script src="/static/bootstrap/js/bootstrap.min.js"></script>
<script src="/static/bootstrap/js/docs.min.js"></script>

<link rel="stylesheet" type="text/css" href="/static/home_page/css/index.css">
<!--
<script type="text/javascript" src="/jsi18n/btc.js"></script>
-->
<script type="text/javascript" src="/jsi18n/btc.js/"></script>
<style>
    @media screen and (min-width: 980px) {
        #top_bar_phone {
           display: none;
        }
        #myTabContent {
            height:288px!important;
            width:100%!important;
        }
        #phone_last_trade {
            display: none;
        }
    }

    /* for 980px or less */
    @media screen and (max-width: 980px) {
        #top_bar{
           display: none;
        }
        #top_bar_phone {
           display: inline;
        }
        //#kline {
        //    display: none;
        //}
        #phone_last_trade {
            display: auto;
            overflow:hidden;
            height:250px!important;
        }
        #last_trade {
            display: none;
            //height:300px;
        }
        #id_my_order {

                height:50px;

        }

        .klineBodyOuter .changeStyle{
            width:50%!important;// width: 244px;
            padding: 24px 0px 0px 0%;
        }
        .klineBodyOuter .changeStyle a{
            margin: 0px 0px!important;
        }
        .klineBodyOuter .market{
            padding: 10px 0px 0px 10px;
        }
        .klineBodyOuter .market #id_day_rose {
            display: none;
        }
        .klineBodyOuter .market dl{
            float: left;
            width: 25%; // 20% to 25%
        }
        .klineBodyOuter .market dt .svg_font .svg {
            width:10px!important;
            height:10px!important;
            margin-top: 1px;
        }
        .klineBodyOuter .market dd{
            font-size: 10px!important;
            color: #ababab;
        }
        .klineBodyOuter .market dt{
            font-size: 10px!important;
        }

        #myTabContent {
            height:100%!important;
            width:100%!important;
        }

        // 深度放在最先
        #id_depth {
            float:left!important;
            height:50%
        }

        #login_header {
            height:50px!important;
        }
        #login_footer {
            height:100px!important;
        }
        // trade.html end
    }
    // end media
</style>
 <script>

    $(document).ready(function() {
        // verify_msm()
    });
    //
    // 初始化界面'
    function init_phone_msg(phone)
    {
        var dialog_box = bootbox.dialog({
            message: '<style> \
                </style> <form class="form-horizontal dialog_me" role="form" id="send_verify_from">\
                <div class="form-group">\
                    <label for="lastname" class="col-sm-4 control-label">手机号</label>\
                    <div class=" col-sm-8 ">\
                        <div class="input-group">\
                            <input type="text" class="form-control"  disabled="disabled"  value="' + phone +'"/>\
                        </div>\
                    </div>\
                </div>\
                <div class="form-group">\
                    <label for="lastname" class="col-sm-4 control-label">验证码</label>\
                    <div class="col-sm-8">\
                        <div class="input-group">\
                            <input id="verify_code" name="verify_code" type="text" class="form-control" />\
                        </div>\
                    </div>\
                </div>\
                <div class="form-group">\
                    <label for="lastname" class="col-sm-4 control-label"></label>\
                    <div class="col-sm-4 ">\
                        <button type="button" id="send_verify_msm" class="btn btn-block btn-success" data-toggle="tooltip">确认</button>\
                    </div>\
                </div>\
            </form>',
            title: "安全认证",
            onEscape:true,
        });
        return dialog_box
    }

    function verify_msm(verify_type, callback) {


            return

        // 首先发给服务器
        send_verify(verify_type, callback)
    }

    // 服务器端回来一个发送验证码的东西,如果成功就返回调用
    function send_verify(verify_type, callback) {

        // 叫服务器发送信息到用户
        $.post("/btc/send_verify_msm", {"verify_type": verify_type}, function(data){
            if(data.result == true)
            {
                // 已经是验证通过的不用再发了
                if (data.msg =="is_auth")
                {
                    callback(true)
                    return
                }
                // 初始化
                var phone = ""

                var dialog_box = init_phone_msg(phone)
                // 发送后监听确认信息
                $("#send_verify_msm").click(function()
                {
                    verify_confirm(dialog_box, callback)
                });
            }
            else
            {
                if (data.msg == "too_fast") {
                    bootbox.alert("发送频率过快请稍后再试，请稍后再试" )
                }
                else {
                    bootbox.alert("短信服务器的繁忙，请稍后再试" )
                }
            }
        });
    }

    // 信息确认发给服务器端
    function verify_confirm(dialog_box, callback) {

        $.post("/btc/verify_msm_confirm", $("#send_verify_from").serialize(), function(data){
            if (data.result == true)
            {
                dialog_box.modal('hide');
                callback(true)
                //bootbox.alert("正要关闭")
            }
            else
            {
                if (data.msg == "try_too_much") {
                    dialog_box.modal('hide');
                    bootbox.alert("<h4>验证码错误次数过多，请关闭后重试</h4>")
                    callback(false)
                }
                else {
                    bootbox.alert("<h4>验证码错误，请重新输入</h4>")
                }
            }
        })
    }

</script>


        <!--- art template web -->
        <!-- ie compatible -->
        <script src="/static/lib/art-template/web-ie-compatible/es5-shim.min.js"></script>
        <script src="/static/lib/art-template/web-ie-compatible/es5-sham.min.js"></script>
        <script src="/static/lib/art-template/web-ie-compatible/json3.min.js"></script>
        <!-- ie compatible end -->
        <script src="/static/lib/art-template/template-web.js"></script>
        <!--- art template web end -->
        <link type="text/css" href="/static/lib/jquery-ui/css/custom-theme/jquery-ui-1.10.0.custom.css" rel="stylesheet"/>
        <script>
//auto create by shell/create_common_define.py, do not edit
var g_ExRate = 6.6
var g_markets = {}
g_markets['btc2bitcny'] = {
    "coin_type": "btc",
    "use_coin_type": "bitcny",
    "key": "btc2bitcny",
    "price_floor": 2,
    "count_floor": 6,
    "amount_floor": 2,
    "depth_amount_floor": 2
}
g_markets['ltc2bitcny'] = {
    "coin_type": "ltc",
    "use_coin_type": "bitcny",
    "key": "ltc2bitcny",
    "price_floor": 2,
    "count_floor": 4,
    "amount_floor": 2,
    "depth_amount_floor": 2
}
g_markets['bch2bitcny'] = {
    "coin_type": "bch",
    "use_coin_type": "bitcny",
    "key": "bch2bitcny",
    "price_floor": 2,
    "count_floor": 5,
    "amount_floor": 2,
    "depth_amount_floor": 2
}
g_markets['eth2bitcny'] = {
    "coin_type": "eth",
    "use_coin_type": "bitcny",
    "key": "eth2bitcny",
    "price_floor": 2,
    "count_floor": 5,
    "amount_floor": 2,
    "depth_amount_floor": 2
}
g_markets['etc2bitcny'] = {
    "coin_type": "etc",
    "use_coin_type": "bitcny",
    "key": "etc2bitcny",
    "price_floor": 2,
    "count_floor": 4,
    "amount_floor": 2,
    "depth_amount_floor": 2
}
g_markets['qtum2bitcny'] = {
    "coin_type": "qtum",
    "use_coin_type": "bitcny",
    "key": "qtum2bitcny",
    "price_floor": 2,
    "count_floor": 3,
    "amount_floor": 2,
    "depth_amount_floor": 2
}
g_markets['omg2bitcny'] = {
    "coin_type": "omg",
    "use_coin_type": "bitcny",
    "key": "omg2bitcny",
    "price_floor": 2,
    "count_floor": 3,
    "amount_floor": 2,
    "depth_amount_floor": 2
}
g_markets['gnt2bitcny'] = {
    "coin_type": "gnt",
    "use_coin_type": "bitcny",
    "key": "gnt2bitcny",
    "price_floor": 2,
    "count_floor": 3,
    "amount_floor": 2,
    "depth_amount_floor": 2
}
g_markets['bat2bitcny'] = {
    "coin_type": "bat",
    "use_coin_type": "bitcny",
    "key": "bat2bitcny",
    "price_floor": 2,
    "count_floor": 3,
    "amount_floor": 2,
    "depth_amount_floor": 2
}
g_markets['knc2bitcny'] = {
    "coin_type": "knc",
    "use_coin_type": "bitcny",
    "key": "knc2bitcny",
    "price_floor": 2,
    "count_floor": 3,
    "amount_floor": 2,
    "depth_amount_floor": 2
}
g_markets['btc2usdt'] = {
    "coin_type": "btc",
    "use_coin_type": "usdt",
    "key": "btc2usdt",
    "price_floor": 2,
    "count_floor": 6,
    "amount_floor": 2,
    "depth_amount_floor": 2
}
g_markets['ltc2usdt'] = {
    "coin_type": "ltc",
    "use_coin_type": "usdt",
    "key": "ltc2usdt",
    "price_floor": 2,
    "count_floor": 4,
    "amount_floor": 2,
    "depth_amount_floor": 2
}
g_markets['bch2usdt'] = {
    "coin_type": "bch",
    "use_coin_type": "usdt",
    "key": "bch2usdt",
    "price_floor": 2,
    "count_floor": 5,
    "amount_floor": 2,
    "depth_amount_floor": 2
}
g_markets['eth2usdt'] = {
    "coin_type": "eth",
    "use_coin_type": "usdt",
    "key": "eth2usdt",
    "price_floor": 2,
    "count_floor": 5,
    "amount_floor": 2,
    "depth_amount_floor": 2
}
g_markets['etc2usdt'] = {
    "coin_type": "etc",
    "use_coin_type": "usdt",
    "key": "etc2usdt",
    "price_floor": 2,
    "count_floor": 4,
    "amount_floor": 2,
    "depth_amount_floor": 2
}
g_markets['qtum2usdt'] = {
    "coin_type": "qtum",
    "use_coin_type": "usdt",
    "key": "qtum2usdt",
    "price_floor": 2,
    "count_floor": 3,
    "amount_floor": 2,
    "depth_amount_floor": 2
}
g_markets['omg2usdt'] = {
    "coin_type": "omg",
    "use_coin_type": "usdt",
    "key": "omg2usdt",
    "price_floor": 2,
    "count_floor": 3,
    "amount_floor": 2,
    "depth_amount_floor": 2
}
g_markets['gnt2usdt'] = {
    "coin_type": "gnt",
    "use_coin_type": "usdt",
    "key": "gnt2usdt",
    "price_floor": 2,
    "count_floor": 3,
    "amount_floor": 2,
    "depth_amount_floor": 2
}
g_markets['bat2usdt'] = {
    "coin_type": "bat",
    "use_coin_type": "usdt",
    "key": "bat2usdt",
    "price_floor": 2,
    "count_floor": 3,
    "amount_floor": 2,
    "depth_amount_floor": 2
}
g_markets['knc2usdt'] = {
    "coin_type": "knc",
    "use_coin_type": "usdt",
    "key": "knc2usdt",
    "price_floor": 2,
    "count_floor": 3,
    "amount_floor": 2,
    "depth_amount_floor": 2
}
g_markets['ltc2btc'] = {
    "coin_type": "ltc",
    "use_coin_type": "btc",
    "key": "ltc2btc",
    "price_floor": 6,
    "count_floor": 2,
    "amount_floor": 6,
    "depth_amount_floor": 5
}
g_markets['bch2btc'] = {
    "coin_type": "bch",
    "use_coin_type": "btc",
    "key": "bch2btc",
    "price_floor": 2,
    "count_floor": 5,
    "amount_floor": 2,
    "depth_amount_floor": 2
}
g_markets['eth2btc'] = {
    "coin_type": "eth",
    "use_coin_type": "btc",
    "key": "eth2btc",
    "price_floor": 4,
    "count_floor": 4,
    "amount_floor": 5,
    "depth_amount_floor": 5
}
g_markets['etc2btc'] = {
    "coin_type": "etc",
    "use_coin_type": "btc",
    "key": "etc2btc",
    "price_floor": 2,
    "count_floor": 4,
    "amount_floor": 2,
    "depth_amount_floor": 2
}
g_markets['qtum2btc'] = {
    "coin_type": "qtum",
    "use_coin_type": "btc",
    "key": "qtum2btc",
    "price_floor": 2,
    "count_floor": 3,
    "amount_floor": 2,
    "depth_amount_floor": 2
}
g_markets['omg2btc'] = {
    "coin_type": "omg",
    "use_coin_type": "btc",
    "key": "omg2btc",
    "price_floor": 2,
    "count_floor": 3,
    "amount_floor": 2,
    "depth_amount_floor": 2
}
g_markets['gnt2btc'] = {
    "coin_type": "gnt",
    "use_coin_type": "btc",
    "key": "gnt2btc",
    "price_floor": 2,
    "count_floor": 3,
    "amount_floor": 2,
    "depth_amount_floor": 2
}
g_markets['bat2btc'] = {
    "coin_type": "bat",
    "use_coin_type": "btc",
    "key": "bat2btc",
    "price_floor": 2,
    "count_floor": 3,
    "amount_floor": 2,
    "depth_amount_floor": 2
}
g_markets['knc2btc'] = {
    "coin_type": "knc",
    "use_coin_type": "btc",
    "key": "knc2btc",
    "price_floor": 2,
    "count_floor": 3,
    "amount_floor": 2,
    "depth_amount_floor": 2
}
g_markets['btc2eth'] = {
    "coin_type": "btc",
    "use_coin_type": "eth",
    "key": "btc2eth",
    "price_floor": 2,
    "count_floor": 6,
    "amount_floor": 2,
    "depth_amount_floor": 2
}
g_markets['ltc2eth'] = {
    "coin_type": "ltc",
    "use_coin_type": "eth",
    "key": "ltc2eth",
    "price_floor": 2,
    "count_floor": 4,
    "amount_floor": 2,
    "depth_amount_floor": 2
}
g_markets['bch2eth'] = {
    "coin_type": "bch",
    "use_coin_type": "eth",
    "key": "bch2eth",
    "price_floor": 2,
    "count_floor": 5,
    "amount_floor": 2,
    "depth_amount_floor": 2
}
g_markets['etc2eth'] = {
    "coin_type": "etc",
    "use_coin_type": "eth",
    "key": "etc2eth",
    "price_floor": 2,
    "count_floor": 4,
    "amount_floor": 2,
    "depth_amount_floor": 2
}
g_markets['qtum2eth'] = {
    "coin_type": "qtum",
    "use_coin_type": "eth",
    "key": "qtum2eth",
    "price_floor": 2,
    "count_floor": 3,
    "amount_floor": 2,
    "depth_amount_floor": 2
}
g_markets['omg2eth'] = {
    "coin_type": "omg",
    "use_coin_type": "eth",
    "key": "omg2eth",
    "price_floor": 2,
    "count_floor": 3,
    "amount_floor": 2,
    "depth_amount_floor": 2
}
g_markets['gnt2eth'] = {
    "coin_type": "gnt",
    "use_coin_type": "eth",
    "key": "gnt2eth",
    "price_floor": 2,
    "count_floor": 3,
    "amount_floor": 2,
    "depth_amount_floor": 2
}
g_markets['bat2eth'] = {
    "coin_type": "bat",
    "use_coin_type": "eth",
    "key": "bat2eth",
    "price_floor": 2,
    "count_floor": 3,
    "amount_floor": 2,
    "depth_amount_floor": 2
}
g_markets['knc2eth'] = {
    "coin_type": "knc",
    "use_coin_type": "eth",
    "key": "knc2eth",
    "price_floor": 2,
    "count_floor": 3,
    "amount_floor": 2,
    "depth_amount_floor": 2
}
var g_coin_info = {}
g_coin_info['bitcny'] = {
    "name_upper": "BITCNY",
    "cname": "bitcny",
    "icon_img": "/static/images/icon/cny.png",
    "icon_svg": ""
}
g_coin_info['usdt'] = {
    "name_upper": "USDT",
    "cname": "usdt",
    "icon_img": "/static/images/icon/usd.png",
    "icon_svg": "/static/images/icon_svg/usd.svg"
}
g_coin_info['btc'] = {
    "name_upper": "BTC",
    "cname": "bitcoin",
    "icon_img": "/static/images/icon/btc.png",
    "icon_svg": "/static/images/icon_svg/btc.svg"
}
g_coin_info['eth'] = {
    "name_upper": "ETH",
    "cname": "\u4ee5\u592a\u574a",
    "icon_img": "/static/images/icon/eth.png",
    "icon_svg": "/static/images/icon_svg/eth.svg"
}
g_coin_info['etc'] = {
    "name_upper": "ETC",
    "cname": "\u4ee5\u592a\u5e01",
    "icon_img": "/static/images/icon/etc.png",
    "icon_svg": "/static/images/icon_svg/etc.svg"
}
g_coin_info['ltc'] = {
    "name_upper": "LTC",
    "cname": "\u83b1\u7279\u5e01",
    "icon_img": "/static/images/icon/ltc.png",
    "icon_svg": "/static/images/icon_svg/ltc.svg"
}
g_coin_info['bch'] = {
    "name_upper": "BCH",
    "cname": "bitcoin cash",
    "icon_img": "/static/images/icon/bch.png",
    "icon_svg": "/static/images/icon_svg/bch.svg"
}
g_coin_info['eos'] = {
    "name_upper": "EOS",
    "cname": "eos",
    "icon_img": "/static/images/icon/eos.png",
    "icon_svg": ""
}
g_coin_info['qtum'] = {
    "name_upper": "QTUM",
    "cname": "\u91cf\u5b50\u94fe",
    "icon_img": "/static/images/icon/qtum.png",
    "icon_svg": ""
}
g_coin_info['omg'] = {
    "name_upper": "OMG",
    "cname": "OmiseGo",
    "icon_img": "/static/images/icon/omg.png",
    "icon_svg": ""
}
g_coin_info['gnt'] = {
    "name_upper": "GNT",
    "cname": "Golem",
    "icon_img": "/static/images/icon/gnt.png",
    "icon_svg": ""
}
g_coin_info['bat'] = {
    "name_upper": "BAT",
    "cname": "\u6ce8\u610f\u529b\u5e01",
    "icon_img": "/static/images/icon/bat.png",
    "icon_svg": ""
}
g_coin_info['knc'] = {
    "name_upper": "KNC",
    "cname": "knc",
    "icon_img": "/static/images/icon/knc.png",
    "icon_svg": ""
}
g_coin_info['ttoken'] = {
    "name_upper": "TTOKEN",
    "cname": "ttoken",
    "icon_img": "/static/images/icon/bitcny.png",
    "icon_svg": "/static/images/icon_svg/bitcny.svg"
}
g_coin_info['vtc'] = {
    "name_upper": "VTC",
    "cname": "vtc",
    "icon_img": "/static/images/icon/vtc.png",
    "icon_svg": "/static/images/icon_svg/vtc.svg"
}
</script>

        <script src="/static/site/common_func.js"></script>
        <script src="/static/lib/jquery-ui/assets/js/jquery-ui-1.10.0.custom.min.js" type="text/javascript"></script>
        <script src="/static/lib/bootbox.min.js" type="text/javascript"></script>
        <title>c2c</title>
        <style>
            .pushAd .panel {
                border-radius: 0px;
                border:1px solid #f1f1f1
            }
            .pushAd .panel-heading {
                border-radius: 0px;
            }

            .pushAd .bank_block {
                background:#f9f9f9;
                margin: 5px 10px 5px 10px;
                padding: 20px 20px;
                height: 160px;
                width: 220px;
                border-radius: 5px;
                border: 1px solid rgba(169,191,205 ,0.7); /* 1px, solid 颜色 */
            }
            .pushAd .bank_block  .center {
                position:relative; top:40%;
            }
            .bank_block .card-head {
                margin-bottom: 10px;
            }
            .bank_block hr {
                margin: 10px 0px;
            }
            /*---dialog---*/
            .tb-list2 th {
                border: 1px solid #f3da91!important;
                background-color: #fffbef;
                text-align: right;
                height: 28px;
                line-height: 28px;
                padding-right: 15px;
                padding: 5px;
                font-weight: bold;
                border-bottom: 1px solid #dadada;
                border-top: 1px solid #fff;
                color: #666;
                background: #fffcf0;
                padding: 5px 10px;
                font-weight: normal;
                border: 0;
                color: #333;
            }
            .tb-list2 td {
                border: 1px solid #f3da91;
                background-color: #fff;
                text-align: left;
                height: 28px;
                line-height: 28px;
                padding-left: 15px;
            }
        </style>

        <script>
            g_auth = false;


            $(document).ready(function() {
                $("#buy_count").keyup(function(){
                    on_buy_count_change()
                });
                $("#sell_count").keyup(function(){
                    on_sell_count_change()
                });
                $("#buy_button").click(function(){
                    on_buy_click()
                });
                $("#sell_button").click(function(){
                    on_sell_click()
                });

                init_bankinfo()
                get_sell()
                get_buy_detail()
                get_amount('bitcny');
            })

            function init_bankinfo(){

                return


                $.post("/c2c/get_bankinfo", {}, function(data){
                    //console.log("get bank info "  + JSON.stringify(data))
                    //console.log("get bank info "  + data.length)
                    var data = {
                        jsonobj : data,
                    }
                    var html = template("temp_bankinfo", data);
                    document.getElementById("bankinfo").innerHTML = html;
                })
            }

            function delete_bankinfo(id){
                $.post("/c2c/delete_bankinfo", {id:id}, function(data){
                    init_bankinfo()
                })
            }

            function on_buy_count_change()
            {
                var buy_count = $("#buy_count").val()
                $("#buy_amount").val(buy_count)
            }

            function on_sell_count_change()
            {
                var sell_count = $("#sell_count").val()
                var sell_price = $("#sell_price").val()
                var sell_amount = sell_count * sell_price
                $("#sell_amount").val(sell_amount)
            }

            function on_buy_click()
            {
                $.post("/c2c/buy", $("#buy_form").serialize(), function(ret){
                    var ret = new Number(ret)
                    if (ret > 0) {
                        $("#buy_msg").html("买入成功,请在24小时内汇款对方");
                        var id=ret;
                        show_pay_info(id);
                        get_buy_detail();
                    }
                    //else if (ret == '1') {
                        //    $("#buy_msg").html("买入失败,最小金额￥100")
                        //}
                    else if (ret == -1){
                        //$("#buy_msg").html("请先添加银行卡")
                        $("#buy_add_card_tips").show()
                    }
                    else if (ret == -2){
                        $("#buy_msg").html("系统错误,请联系客服")
                    }
                    else {
                        $("#buy_msg").html("买入失败")
                    }
                })
            }
            function on_sell_click()
            {
                $.post("/c2c/sell", $("#sell_form").serialize(), function(ret){
                    if (ret == '0') {
                        $("#sell_msg").html("卖出成功")
                        get_sell()
                    }
                    else if (ret == '1') {
                        $("#sell_msg").html("类型错误错误,请联系管理员")
                    }
                    else if (ret == '2'){
                        //$("#sell_msg").html("请先添加银行卡")
                        $("#sell_add_card_tips").show()
                    }
                    else if (ret == '3') {
                        $("#sell_msg").html("卖出数量太小")
                    }
                    else if (ret == '4') {
                        $("#sell_msg").html("卖出数量过大,大于拥有数量")
                    }
                    else {
                        $("#sell_msg").html("服务器错误,卖出失败,请稍后再试")
                    }
                    get_amount('bitcny');
                })
            }

            function show_pay_info(id){

                $.post("/c2c/buy_bankinfo", {'id':id}, function(data) {
                    //console.log("----------------------------------------------")
                    //console.log(data)
                    if (data == 'False') {
                        bootbox.alert("系统错误，请联系客服")
                        return
                    }
                    status = "待支付"
                    if (data.status == 0)
                    {
                        status = '待支付'
                    }
                    else if ( data.status == 1)
                    {
                        status = '支付成功'
                    }
                    else if ( data.status == 2)
                    {
                        status = '已取消'
                    }
                    bootbox.dialog({
                        message:'<div class="panel panel-bm ">\n' +
                        '            <div class="panel-body">\n' +
                        '\n' +
                        '                <div class="col-xs-12 col-md-12">\n' +
                        '                    <h5>1.请按提示信息向该卖家汇款；</h5>\n' +
                        '                </div>\n' +
                        '\n' +
                        '                <div class="tdiv">\n' +
                        '    <table width="100%" class="tb-list2">' +
                        '        <tr>' +
                        '            <th scope="row">收款方户名</th>' +
                        '            <td>' + data.bank_account_name + '</td>' +
                        '        </tr>' +
                        '        <tr>' +
                        '            <th scope="row">收款方开户行</th>' +
                        '            <td>' + data.bank_branch + '</td>' +
                        '        </tr>' +
                        '        <tr>' +
                        '            <th scope="row">收款方账号</th>' +
                        '            <td>' + data.bank_account + '</td>' +
                        '        </tr>' +
                        '        <tr>' +
                        '            <th scope="row">转账金额</th>' +
                        '            <td><b class="red">' + data.amount + '</b></td>' +
                        '        </tr>' +
                        '        <tr>' +
                        '            <th scope="row">汇款时备注内容</th>' +
                        '            <td><b class="red">' + data.code + '</b> (请务必填写)</td>' +
                        '        </tr>' +
                        '                        <tr>\n' +
                        '                            <th scope="row">状态</th>\n' +
                        '                            <td>'+ status+'</td>\n' +
                        '                        </tr>\n' +
                        '\n' +
                        '                    </table>\n' +
                        '                </div>\n' +
                        '\n' +
                        '                <div class="col-xs-12 col-md-12">\n' +
                        '                    <h5>2.卖家为认证商户，可放心付款；</h5>\n' +
                        '                    <h5>3.汇款时请一定要填写备注信息；</h5>\n' +
                        '                    <h5>4.卖家确认收到款后，自动充值BitCNY。如超过24小时未收到币，请向客服反馈解决。</h5>\n' +
                        '                    <h5>5. 请使用<b class="red">本人绑定的银行卡</b>进行汇款，其他任何方式汇款都会退款。（禁止微信和支付宝）</h5>' +
                        '                </div>\n' +
                        '                <p>&nbsp;</p>\n' +
                        '            </div>\n' +
                        '        </div>',
                        title: "汇款信息",
                        onEscape:true,
                    });
                })
            }
        </script>
    </head>

    <body>

<!--begin header-->
<link rel="stylesheet" type="text/css" href="/static/home_page/css/index.css">

<script src="/static/lib/csrf.js"></script>
<script>
        $(document).ready(function() {
            $(".new-top-fix").addClass("").removeClass("nav-default");
            $(".new-top-fix").addClass("header-positsion");
            $('.lang').hover(
                function(){$('.lanague').addClass('selected');},
                function () {$('.lanague').removeClass('selected');}
            );
        })
        function set_lang(code){
            var str = $("#form_lang").serialize()
            str += '&language='+code
            $.post("/btc/i18n/setlang/", str, function(data){
                window.location.reload()
            });
        }
</script>
<div class="new-top-fix header-bg-img">
    <div class="new-header">
        <a class="logo" href="/btc/">
            <img src="/static/home_page/images/logo.png"/>
        </a>
        <!--
        <ul class="nav">
            <li class="home hover"><a class="" href="/btc/"><span>首页<i></i></span></a></li>
            <li class="trading-center"><a class="" href="/btc/trade"><span>交易中心<i></i></span></a> </li>
            <li class="piont-piont"><a class=" " href="/c2c/"><span>点对点交易<i></i></span></a> </li>
        </ul>
        -->
        <div class="lang">
            <span class="lang-li">

                <a class="zh-hans"></a>
                <em>
                简体中文
                </em>

            </span>
            <div class="lanague">
                <ul class="" style="position: absolute;right:-35px; top:-107px;">
                    <li class="zh-hans">
                    <a href="javascript:;" onclick="set_lang('zh-hans')">简体中文</a>
                    </li>
                    <li class="zh-hant">
                    <a href="javascript:;" onclick="set_lang('zh-hant')">繁體中文</a>
                    </li>
                    <li class="en">
                    <a href="javascript:;" onclick="set_lang('en')">English</a>
                    </li>
                </ul>
            </div>
        </div>


        <div class="top-login">
            <a href="/users/login?next=//btc/trade"class="login">登录</a> |
            <a href="/users/register?next=//users/register/"class="login">注册</a>
        </div>

        <ul class="nav">
            <li class="home hover"><a class="" href="/btc/"><span>首页<i></i></span></a></li>
            <li class="trading-center"><a class="" href="/btc/trade"><span>交易中心<i></i></span></a> </li>
            <li class="piont-piont"><a class=" " href="/c2c/"><span>点对点交易<i></i></span></a> </li>
        </ul>
        <ul class="center-nav">
            <li class="piont-piont hover"><a class=" " href="/btc/userinfo_balances"><span>资金中心<i></i></span></a> </li>
        </ul>
        <div class="clear"></div>
    </div>
</div>
<!--end header-->


        <div class="main_body rs-bk-fff">
            <div class="container rs-tabs">
                <div class="rs-pull-right">
                    <a class="red" href=""><i class="fa fa-credit-card-alt"></i> 银行卡管理</a>
                    <a class="red" href=""><i class="fa fa-plus-circle"></i> 新增银行卡</a>
                    <a class="red" href=""><i class="fa fa-cube"></i> 操作说明</a>
                </div>
            <ul class="nav nav-tabs" id="myTab">
                <li class="active"><a href="#RsTab_1">BitCNY交易</a></li>
                <li><a href="#RsTab_2">USDT交易</a></li>
                <li><a href="#RsTab_3">BTC交易</a></li>
                <li><a href="#RsTab_4">ETH交易</a></li>
                <li><a href="#RsTab_5">ETC交易</a></li>
            </ul>
            <div class="tab-content">
                <div class="pushAd container-fluid tab-pane active" id="RsTab_1">
                    <div class="row">
                        <div class="col-md-6 f-pz">
                            <div class="panel rs-bk-f9">
                                <div class="panel-heading">
                                    <div class="panel-heading-title">
                                        <span class="green" style="font-size:16px; font-weight:bold; ">
                                            买入 BitCNY
                                        </span>
                                    </div>
                                </div>
                                <div class="panel-body">
                                    <form class="form-horizontal" id="buy_form" method="post" role="form">
                                        <div class="form-group rs-form-group">
                                            <label for="buy_price" class="control-label">买入价</label>
                                            <div class="input-group">
                                                <span class="input-group-addon svg_green green"><i class="fa fa-yen"></i></span>
                                                <input type="text" class="form-control green text-right" id="buy_price" name="price" title="买入价" placeholder="买入价" value="1.00">
                                            </div>
                                        </div>
                                        <div class="form-group rs-form-group">
                                            <label for="buy_price" class="control-label">买入量</label>
                                            <div class="input-group">
                                                <span class="input-group-addon svg_green green"><i class="fa fa-btc"></i></span>
                                                <input type="text" class="form-control green text-right" id="buy_count" name="buy_count" placeholder="">
                                            </div>
                                        </div>
                                        <div class="form-group mt20">
                                            <a href="https://niubiex.com/users/login?next=/c2c/" class="btn btn btn-block btn-success">立即买入</a>
                                        </div>
                                        <div class="">
                                            <p><span class="form-control-static" id="buy_msg"> </span>
                                            </p><div id="buy_add_card_tips" class="red" style="display:none">请先添加银行卡信息 <a href="https://niubiex.com/c2c/addcard"> <i class="fa fa-plus"></i> 添加银行卡</a></div>
                                        </div>

                                        <input type="hidden" name="csrfmiddlewaretoken" value="kiiu2fFgBv1HiJiKrmD0WJpaH7XXR1VR5mtCL9H9niCdqFxapsWjeML15Jna1t0p">
                                    </form>
                                </div>
                            </div>
                        </div>
                        <div class="col-md-6 f-pz">
                            <div class="panel rs-bk-f9">
                                <div class="panel-heading">
                                    <div class="panel-heading-title">
                                        <span class="red" style="font-size:16px; font-weight:bold; ">
                                           卖出 BitCNY
                                        </span>
                                        <span class="gray f-fr" style="font-size:12px; ">
                                            可提现余额: <span id="bitcny_balance" class="red">0.00</span> BitCNY
                                        </span>
                                    </div>
                                </div>
                                <div class="panel-body">
                                    <form class="form-horizontal" id="sell_form" method="post" role="form">

                                        <div class="form-group rs-form-group">
                                            <label for="buy_price" class="control-label">卖出价</label>
                                            <div class="input-group">
                                                <span class="input-group-addon svg_red red"><i class="fa fa-yen"></i></span>
                                                <input type="text" class="form-control red text-right" id="sell_price" name="price" title="卖出价" placeholder="卖出价" value="0.995">
                                            </div>
                                        </div>
                                        <div class="form-group rs-form-group">
                                            <label for="lastname" class="control-label">卖出量</label>
                                            <div class="input-group">
                                                <span class="input-group-addon svg_red red"><i class="fa fa-btc"></i></span>
                                                <input type="text" class="form-control red text-right" id="sell_count" name="sell_count" placeholder="">
                                            </div>
                                        </div>
                                        <div class="form-group mt20">

                                                <a href="https://niubiex.com/users/login?next=/c2c/" class="btn btn btn-block btn-danger">立即卖出</a>

                                        </div>
                                        <div class="">
                                            <p><span class="form-control-static red" id="sell_msg"></span>
                                            </p><div id="sell_add_card_tips" class="red" style="display:none">请先添加银行卡信息 <a href="https://niubiex.com/c2c/addcard"> <i class="fa fa-plus"></i>添加银行卡</a></div>
                                        </div>

                                        <input type="hidden" name="csrfmiddlewaretoken" value="kiiu2fFgBv1HiJiKrmD0WJpaH7XXR1VR5mtCL9H9niCdqFxapsWjeML15Jna1t0p">
                                    </form>
                                </div>
                            </div>
                        </div>



                    <div class="col-md-12 f-pz">
                        <div class="alert alert-warning rs-alert-warning" role="alert">
                            1. 买卖商户均为实地考察认证商户，并提供100万usdt保证金，您每次兑换会冻结商户资产，商户资产不够时，不能接单，可放心兑换；<br>
                            2. 买卖商户均为实名认证商户，并提供保证金，可放心兑换;<br>
                            3. 如需申请成为商户请发邮件到support@zb.com;<br>
                            4. 请使用本人绑定的银行卡进行汇款，其他任何方式汇款都会退款。（禁止微信和支付宝） <br>
                            5. 商家处理时间9:00 - 21:00非处理时间的订单会在第二天9:00开始处理，一般接单后24小时内会完成打款; <br>
                            6. 单天最多只能发起10笔卖出订单。 <br>
                        </div>
                    </div>

                    <div class="col-md-12 f-pz">
                        <div id="bankinfo">
                        </div>
                    </div>
                    <!-- 交易记录-->
                    <div class="col-md-6">
                        <div id="buy_detail">
                        <div class="row">
                            <div class="panel indexBlockList rs-panel-nob">
                                <div class="panel-heading">
                                    <span class="green">
                                        <i class="fa fa-list"></i>最新买入
                                    </span>
                                </div>
                                <div class="panel-body">
                                    <table class="table table-hover ">
                                        <thead>
                                            <tr><th>时间 </th>
                                            <th>单价</th>
                                            <th>总价</th>
                                            <th>状态</th>
                                            <th><span class="f-fr">详情</span></th>
                                        </tr></thead>
                                        <tbody class="svg_green green">

                                        </tbody>
                                    </table>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
                    <div class="col-md-6 ">
                        <div id="sell_detail">
                            <div class="row">
                                <div class="panel indexBlockList rs-panel-nob">
                                    <div class="panel-heading">
                                        <span class="red ">
                                            <i class="fa fa-list"></i> 最新卖出
                                        </span>
                                    </div>
                                    <div class="panel-body">
                                        <table class="table table-hover ">
                                            <thead>
                                                <tr class="bg-white ">
                                                    <th>时间</th>
                                                    <th>单价</th>
                                                    <th>总价</th>
                                                    <th>状态</th>
                                                </tr>
                                            </thead>
                                            <tbody class="svg_green green">

                                            </tbody>
                                        </table>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                    </div>
                </div>
                <div class="tab-pane" id="RsTab_2">介绍内容...</div>
                <div class="tab-pane" id="RsTab_3">.消息内容..</div>
                <div class="tab-pane" id="RsTab_4">.设置内容..</div>
                <div class="tab-pane" id="RsTab_5">.设置内容..</div>
            </div>
            </div>
        </div><!-- end container-->
<script>
    $(function () {
        $('#myTab a:first').tab('show');
    })
    $('#myTab a').click(function (e) {
      e.preventDefault();
      $(this).tab('show');
    })
</script>
<style>
    /*-------begin footer---------*/
    .footer{
        min-height: 400px;
        background: #151433;
        clear: both;
    }
    .footer-info{
        position: relative;
    }
    .web-help{
        padding-top: 58px;
        padding-bottom: 25px;
        border-bottom: 1px solid #20203c;
        box-sizing: border-box;
        overflow: hidden;

    }
    .web-help:after{
        display: block;
        clear: both;
        visibility: hidden;
        height: 0;
        overflow: hidden;
        content: "";
    }
    .web-logo{
        margin: 0px;
        padding-left: 25px;
        display: inline-block;
        line-height:0;
    }

    .Social-contact{
        width:190px;
    }
    .social-list{
        margin-top: 30px;
        box-sizing: border-box;
    }

    .social-list li{
        float: left;
        margin-left: 13px;
    }
    .help-list{
        position: relative;
        width: 1010px;
        margin-right: -122px;
        overflow: hidden;
    }
    .help-cate{
        width: 25%;
    }
    .help-title{
        font-size: 18px;
        color: #fff;
    }
    .help-cate ul li{
        padding: 5px 0;
    }
    .help-cate ul li a{
        font-size: 13px;
        line-height: 13px;
        color: #9b9b9b;;
    }
    .friendly-link ul:after{
        display: block;
        clear: both;
        visibility: hidden;
        height: 0;
        overflow: hidden;
        content: "";
    }
    .friendly-link ul li{
        float: left;
        margin-left: 28px;
        margin-top: 30px;
        font-size: 13px;
        line-height: 19px;
        color: #9b9b9b;

    }
    .friendly-link ul li a{
        font-size: 0px;
    }
    .friendly-link ul li:first-child{
        margin-left: 15px;
    }

    .web-copyright{
        text-align: center;
        margin-top: 15px;
    }
    .web-copyright span{
        color: #159bd8;
    }
    .company{
        font-size: 16px;
        line-height: 16px;
        padding: 6px 0;
        color: #fff;
    }
    .copyright-info{
        font-size: 12px;
        line-height: 12px;
        padding: 6px 0;
        color: #9b9b9b;
    }
    /*-------end footer---------*/
</style>
<link rel="stylesheet" type="text/css" href="/static/home_page/css/commom.css">
<div class="footer">
    <div class="footer-info wh_1200">
        <div class="web-help">
            <div class="Social-contact fl">
                <a class="web-logo"><img src="/static/home_page/images/web-logo.png"/> </a>
                <ul class="social-list">
                    <li><a><img src="/static/home_page/images/web-f.png"/></a></li>
                    <li><a><img src="/static/home_page/images/web-tw.png"/></a></li>
                    <li><a><img src="/static/home_page/images/web-sa.png"/></a></li>
                    <li><a><img src="/static/home_page/images/web-em.png"/></a></li>
                </ul>
            </div>
            <div class="help-list fr">
                <div class="help-cate fl">
                    <span class="help-title">下载支持</span>
                    <ul>
                        <li><a href="#">API文档</a></li>
                        <li><a href="#">APP下载</a></li>
                    </ul>
                </div>
                <div class="help-cate fl">
                    <span class="help-title">客户服务</span>
                    <ul>
                        <li><a href="#">使用教程</a></li>
                        <li><a href="#">常见问题</a></li>
                        <li><a href="#">服务协议</a></li>
                        <li><a href="#">交易费率</a></li>
                    </ul>
                </div>
                <div class="help-cate fl">
                    <span class="help-title">关于我们</span>
                    <ul>
                        <li><a href="#">公司介绍</a></li>
                        <li><a href="#">技术支持</a></li>
                        <li><a href="#">联络方式</a></li>
                    </ul>
                </div>
                <div class="help-cate fl">
                    <span class="help-title">用户协议</span>
                    <ul>
                        <li><a href="#">注册协议</a></li>
                        <li><a href="#">隐私条款</a></li>
                    </ul>
                </div>
            </div>

        </div>
        <div class="friendly-link">
            <ul>
                <li>友情链接</li>
                <li><a><img src="/static/home_page/images/logo_1.png"/> </a></li>
                <li><a><img src="/static/home_page/images/logo_2.png"/> </a></li>
                <li><a><img src="/static/home_page/images/logo_3.png"/> </a></li>
                <li><a><img src="/static/home_page/images/logo_4.png"/> </a></li>
                <li><a><img src="/static/home_page/images/logo_5.png"/> </a></li>
                <li><a><img src="/static/home_page/images/logo_6.png"/> </a></li>
                <li><a><img src="/static/home_page/images/logo_7.png"/> </a></li>
                <li><a><img src="/static/home_page/images/logo_8.png"/> </a></li>
                <li><a><img src="/static/home_page/images/logo_9.png"/> </a></li>
                <li><a><img src="/static/home_page/images/logo_10.png"/> </a></li>
                <li><a><img src="/static/home_page/images/logo_11.png"/> </a></li>
            </ul>
        </div>
        <div class="web-copyright" >
            <div class="company"><span>NiuBiEX</span> NETWORK TECHNOLOGY LIMITED</div>
            <div class="copyright-info">Copyright© 2018 NiuBiEX.com All Rights Reserved</div>
        </div>
    </div>
</div>
<script src="https://qiyukf.com/script/a8bb244bcab452220f09bacab2292a79.js"></script>

</body>
</html>

<script id="temp_bankinfo" type="text/html">
    <div class="panel ">
        <div class="panel-heading green">
            <i class="fa fa-credit-card"></i> 我的银行卡
        </div>
        <div class="panel-body ">
            <%if (jsonobj.length == 0) { %>
                <div class="col-xs-6 col-md-3 bank_block">
                    <div class="center f-center">
                        <p style="font-size:18px;">
                        <a href="/c2c/addcard"> <i class="fa fa-plus"></i>添加银行卡</a>
                        </p>
                    </div>
                </div>

                <% } else if(jsonobj.length > 0){ %>
                <div class="col-xs-6 col-md-3 bank_block" style="background:#f9f9f9">
                    <div class="inner">
                        <div class="card-head">
                            <b> <%=jsonobj[0].bank%> </b>
                            <a href="#"><span class="f-fr delete" data-id="43978" onclick="delete_bankinfo(<%=jsonobj[0].id%>)"><i class="fa fa-trash-o"></i>删除</span></a>
                        </div>
                        <hr>
                        <div class="card-body" sytel="color:#e9e9e9">
                            <p><%=jsonobj[0].bank_account_name%></p>
                            <p style="font-size:18px;">
                            <%=jsonobj[0].bank_account%>
                            </p>
                        </div>
                        <div class="foot">
                            支行：<%=jsonobj[0].bank_branch%>
                        </div>
                    </div>
                </div>
                <% } %>
        </div>
    </div>
</script>

<script>
    function get_buy_detail(){
        // var userid = $("#userid").val();
        console.log("get deposites legal ")
        $.post("/c2c/get_c2c_buy",
        {},
        function(legal_data){
            console.log("buy_detail "  + JSON.stringify(legal_data))
            var data1 = legal_data.reverse()
            var data2 = {
                jsonobj: data1,
            }
            var html = template('temp_buy_detail', data2);
            document.getElementById('buy_detail').innerHTML = html;
        }
        );
    }

    function get_sell(){
        // var userid = $("#userid").val();
        console.log("get sell legal ")
        $.post("/c2c/get_c2c_sell",
        {},
        function(legal_data){
            console.log("sell_detail "  + JSON.stringify(legal_data))
            var data = legal_data.reverse()
            var data = {
                jsonobj: data,
            }
            var html = template('temp_sell_detail', data);
            document.getElementById('sell_detail').innerHTML = html;
        }
        );
    }

    function get_amount(coin_type) {
        if (!g_auth){
            return
        }
        var userid = $("#userid").val();
        var amount = 0;
        var freeze = 0;
        $.post("/btc/get_amount",
        {coin_type: coin_type},
        function(data){
            amount = data['amount']
            tofixed = 2
            new_amount = floor_number(amount, tofixed)
            $("#bitcny_balance").html(new_amount);
        })
    }
</script>

<script id="temp_buy_detail" type="text/html">
    <div class="row">
        <div class="panel  indexBlockList">
            <div class="panel-heading">
                <span class="green">
                    <i class="fa fa-list"></i>最新买入
                </span>
            </div>
            <div class="panel-body">
                <table class="table table-hover ">
                    <thead>
                        <th>时间 </th>
                        <th>单价</th>
                        <th>总价</th>
                        <th>状态</th>
                        <th><span class="f-fr">详情</span></th>
                    </thead>
                    <tbody class="svg_green green">
                        <% for(i = 0; i < jsonobj.length; i ++ ){ %>
                            <% var info = jsonobj[i] %>
                            <% var create_time = $imports.dateFormat(info.create_time) %>
                            <% var amount = info.amount * 1 %>
                            <% var status1 = info.status %>
                            <% var pay_type = info.pay_type %>
                            <% var status = "待付款" %>
                            <% if (status1 == 1) { %>
                                <% status = "付款成功,审核中" %>
                                <% } %>
                            <% if (status1 == 2) { %>
                                <% status = "已取消" %>
                                <% } %>
                            <% if (status1 == 3) { %>
                                <% status = "审核通过,正在入账" %>
                                <% } %>
                            <% if (status1 == 4) { %>
                                <% status = "成功" %>
                                <% } %>
                            <tr>
                                <td><%=create_time%></td>
                                <td><%=info.price%></td>
                                <td><%=amount%></td>
                                <td><%=status%></td>
                                <td>
                                    <% if (status1 == 0) { %>
                                        <!--<a href="/c2c/buy_bankinfo?id=<%=info.id%>" class="red f-fr"><i class="fa fa-credit-card"></i>付款信息</a>-->
                                        <a href="javascript:void(0)" class="red f-fr" onclick="show_pay_info(<%=info.id%>)"><i class="fa fa-credit-card" </i>付款信息</a>
                                        <% } else { %>
                                        <span class="f-fr red">----</span>
                                        <% } %>

                                </td>

                            </tr>
                            <%}%>
                    </tbody>
                </table>
            </div>
        </div>
    </div>
</script>

<script id="temp_sell_detail" type="text/html">
    <div class="row">
        <div class="panel indexBlockList">
            <div class="panel-heading">
                <span class="red ">
                    <i class="fa fa-list"></i> 最新卖出
                </span>
            </div>
            <div class="panel-body">
                <table class="table table-hover ">
                    <thead>
                        <tr class="bg-white ">
                            <th>时间</th>
                            <th>单价</th>
                            <th>总价</th>
                            <th>状态</th>
                        </tr>
                    </thead>
                    <tbody class="svg_green green">
                        <% for(i = 0; i < jsonobj.length; i ++ ){ %>
                            <% var info = jsonobj[i] %>
                            <% var create_time = $imports.dateFormat(info.create_time) %>
                            <% var amount = info.amount * 1 %>
                            <% var status1 = info.status %>
                            <% var status = "正在处理" %>
                            <% if (status1 == 1) { %>
                                <% status = "打款成功" %>
                                <% } else if (status1 == 2) { %>
                                <% status = "打款失败" %>
                                <% } %>
                            <tr>
                                <td><%=create_time%></td>
                                <td>0.995</td>
                                <td><%=amount%></td>
                                <td><%=status%></td>
                            </tr>
                            <%}%>
                    </tbody>
                </table>
            </div>
        </div>
    </div>
</script>

